<?php

class Faculty_Form_FrmFac extends Zend_Form
{

	public function init()
    {
        /* Form Elements & Other Definitions Here ... */
    	$this->setMethod('post');
    }
    function fromfac($facfrm = null){

    	$fac = new Zend_Form_Element_Text("fac_name");
    		$fac->setAttribs(array("class"=>"form-control validate[required]"));
    	$description = new Zend_Form_Element_Textarea("description");
    		$description->setAttribs(array("class"=>"form-textarea"));	
    	$ordering = new Zend_Form_Element_Text("ordering");
    		$ordering->setAttribs(array("class"=>"form-control validate[required]"));
    		$id = new Zend_Form_Element_Hidden("fac_id");
    	$this->addElements( array($fac,$description,$ordering,$id));    	
    	if($facfrm !=""){
    	
    		$id->setValue($facfrm['fac_id']);
    		$fac->setValue($facfrm['fac_name']);
    		$description->setValue($facfrm['description']);
    		$ordering->setValue($facfrm['ordering']);
    	}
    	return $this;
    }
}
    	